minetest.register_node("lunodecor:frame_camila", {
	description = "Quadro 'Camila Borges'",
	drawtype = "signlike",
	tiles = {"text_frame2.png^text_frame2_camila.png"},
	inventory_image = "text_frame2.png^text_frame2_camila.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
	sounds = default.node_sound_wood_defaults(), 
	--drop = 'lunodecor:frame',
})

--#############################################################################################################################

minetest.register_node("lunodecor:frame", {
	description = "Quadro",
	drawtype = "signlike",
	tiles = {"text_frame2.png"},
	inventory_image = "text_frame2.png^text_frame2_lunovox.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, --{cracky=3,oddly_breakable_by_hand=3},
	sounds = default.node_sound_wood_defaults(), --default.node_sound_glass_defaults(),
	--sounds = default.node_sound_defaults(),
	after_place_node = function(pos, placer, itemstack)
		local lado = minetest.get_node(pos).param2
		local titulo = ""
		local v = math.random(1, 7)
		if v==1 then
			minetest.env:add_node(pos, {name="lunodecor:frame_amizade1"})
			titulo = "Quadro 'Amizade 1'"
		elseif v==2 then
			minetest.env:add_node(pos, {name="lunodecor:frame_amizade2"})
			titulo = "Quadro 'Amizade 2'"
		elseif v==3 then
			minetest.env:add_node(pos, {name="lunodecor:frame_apocalipse"})
			titulo = "Quadro 'Apocalipse'"
		elseif v==4 then
			minetest.env:add_node(pos, {name="lunodecor:frame_inteligencia"})
			titulo = "Quadro 'Inteligencia'"
		elseif v==5 then
			minetest.env:add_node(pos, {name="lunodecor:frame_lunovox"})
			titulo = "Quadro 'Lunovox Heavenfinder'"
		elseif v==6 then
			minetest.env:add_node(pos, {name="lunodecor:frame_perseveranca"})
			titulo = "Quadro 'Perseveranca'"
		elseif v==7 then
			minetest.env:add_node(pos, {name="lunodecor:frame_precoceito"})
			titulo = "Quadro 'Precoceito'"
		end
		
		--Iguala a direcaoo lado do bloco igual a anterior
		local node = minetest.get_node(pos)
		node.param2 = lado
		minetest.swap_node(pos, node)
		minetest.env:get_meta(pos):set_string("infotext", titulo)
	end,
})

minetest.register_craft({
	output = 'lunodecor:frame',
	recipe = {
		{"default:gold_ingot"	,"default:gold_ingot"	,"default:gold_ingot"},
		{"default:gold_ingot"	,"default:paper"			,"default:gold_ingot"},
		{"default:gold_ingot"	,"default:gold_ingot"	,"default:gold_ingot"},
		--COMENTaRIO: dye:dark_green = dye:blue[B2] + dye:yellow[C2]
	}
})

minetest.register_alias("quadro"		,"lunodecor:frame")


--#############################################################################################################################

minetest.register_node("lunodecor:frame_lunovox", {
	description = "Quadro de Lunovox Heavenfinder",
	drawtype = "signlike",
	tiles = {"text_frame2.png^text_frame2_lunovox.png"},
	inventory_image = "text_frame2.png^text_frame2_lunovox.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1},
	sounds = default.node_sound_wood_defaults(),
	drop = 'lunodecor:frame',
})

minetest.register_node("lunodecor:frame_amizade1", {
	description = "Quadro 'Amizade 1'",
	drawtype = "signlike",
	tiles = {"text_frame2.png^text_frame2_amizade1.png"},
	inventory_image = "text_frame2.png^text_frame2_amizade1.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1},
	sounds = default.node_sound_wood_defaults(),
	drop = 'lunodecor:frame',
})

minetest.register_node("lunodecor:frame_amizade2", {
	description = "Quadro 'Amizade 2'",
	drawtype = "signlike",
	tiles = {"text_frame2.png^text_frame2_amizade2.png"},
	inventory_image = "text_frame2.png^text_frame2_amizade2.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1},
	sounds = default.node_sound_wood_defaults(),
	drop = 'lunodecor:frame',
})

minetest.register_node("lunodecor:frame_perseveranca", {
	description = "Quadro 'Perseveranca'",
	drawtype = "signlike",
	tiles = {"text_frame2.png^text_frame2_perseveranca.png"},
	inventory_image = "text_frame2.png^text_frame2_perseveranca.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1},
	sounds = default.node_sound_wood_defaults(),
	drop = 'lunodecor:frame',
})

minetest.register_node("lunodecor:frame_precoceito", {
	description = "Quadro 'Precoceito'",
	drawtype = "signlike",
	tiles = {"text_frame2.png^text_frame2_precoceito.png"},
	inventory_image = "text_frame2.png^text_frame2_precoceito.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1},
	sounds = default.node_sound_wood_defaults(),
	drop = 'lunodecor:frame',
})

minetest.register_node("lunodecor:frame_inteligencia", {
	description = "Quadro 'Inteligencia'",
	drawtype = "signlike",
	tiles = {"text_frame2.png^text_frame2_inteligencia.png"},
	inventory_image = "text_frame2.png^text_frame2_inteligencia.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1},
	sounds = default.node_sound_wood_defaults(),
	drop = 'lunodecor:frame',
})

minetest.register_node("lunodecor:frame_apocalipse", {
	description = "Quadro 'Apocalipse'",
	drawtype = "signlike",
	tiles = {"text_frame2.png^text_frame2_apocalipse.png"},
	inventory_image = "text_frame2.png^text_frame2_apocalipse.png",
	selection_box = {type="wallmounted",},
	paramtype = 'light',
	paramtype2 = "wallmounted",
	sunlight_propagates = true,
	walkable = false,
	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2, not_in_creative_inventory=1},
	sounds = default.node_sound_wood_defaults(),
	drop = 'lunodecor:frame',
})

